import ajax from '../main.js';
import '../../css/lease/lease-clientManage.scss'

//标签页切换
$('.content-hide').hide();
$('#customerManager').show();
$('#pageSwitch').on('click','a',function(){
    let href=$(this).attr('href').slice(2);
    console.log();
    $('.content-hide').hide();
    if(href){
        $(`#${href}`).show();   
    }
})
//客户管理分页
layui.use(['laypage', 'layer'], function(){
    var laypage = layui.laypage
    ,layer = layui.layer;
    laypage.render({
        elem: 'paging'
        ,count: 100
        ,layout: ['count', 'prev', 'page', 'next', 'limit', 'refresh', 'skip']
        ,jump: function(obj){
        console.log(obj)
        }
        });
})
$('#buton-res').click(async function(){
    const res=await ajax({
        url:'/clients',
        type:'GET'
    })
    console.log(res);
})
